#include "ui.h"
#include "ObjectId.h"
#include "gfxText.h"
#include "GameObjectSystem.h"

UI::UI(const std::string& uiId)
{
	ObjectId uiObjId = ObjectId(uiId.c_str());

	// Create all GfxText properties associated with our UI objects.
	GfxText* uiTitle1		= MV_NEW GfxText(ObjectId("title1"),	"fixedsys-xlarge",	"Fixedsys", 64, "",	GfxColor::WHITE, GfxRectangle(160, 300, 500, 64), false);
	GfxText* uiTitle2		= MV_NEW GfxText(ObjectId("title2"),	"fixedsys-normal",	"Fixedsys", 32, "", GfxColor::WHITE, GfxRectangle(280, 200, 400, 32), false);
	GfxText* uiInfo1		= MV_NEW GfxText(ObjectId("info1"),		"fixedsys-xsmall",	"Fixedsys", 18, "",	GfxColor::WHITE, GfxRectangle(300, 700, 300, 18), false);
	GfxText* uiInfo2		= MV_NEW GfxText(ObjectId("info2"),		"fixedsys-large",	"Fixedsys", 48, "", GfxColor::WHITE, GfxRectangle(280, 680, 300, 48), false);
	GfxText* uiScore1		= MV_NEW GfxText(ObjectId("score1"),	"fixedsys-xlarge",	"Fixedsys", 64, "", GfxColor::WHITE, GfxRectangle(15,  5, 64, 64), false);
	GfxText* uiScore2		= MV_NEW GfxText(ObjectId("score2"),	"fixedsys-xlarge",	"Fixedsys", 64, "", GfxColor::WHITE, GfxRectangle(740, 5, 64, 64), false);

	// Add them to the GameObjectSystem.
	GameObjectSystem::GetSingleton().addProperty(uiTitle1);
	GameObjectSystem::GetSingleton().addProperty(uiTitle2);
	GameObjectSystem::GetSingleton().addProperty(uiInfo1);
	GameObjectSystem::GetSingleton().addProperty(uiInfo2);
	GameObjectSystem::GetSingleton().addProperty(uiScore1);
	GameObjectSystem::GetSingleton().addProperty(uiScore2);
}